package com.core.framework.tools.xmloprations.noe;
import java.util.HashMap;

import com.core.framework.tools.xmloprations.XmlParserHook;
import com.core.framework.tools.xmloprations.XmlStackDecorator;

/**
 * 所有Xml解析器的基类
 * @version : 2011-11-30
 * @author 赵永春 (zyc@byshell.org)
 */
public abstract class AbstractTag implements XmlParserHook {
    public <T> T getXmlNSContext(String ns, XmlStackDecorator<Object> context) {
        HashMap<String, Object> xmlContext = (HashMap<String, Object>) context.getContext();
        return (T) ((XmlContextBean) xmlContext.get(ns)).xmlContext;
    };
}